import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state:{
    get userToken(){
        return localStorage.getItem('token')
    }, 
    set userToken(value){
        localStorage.setItem('token',value)
    }
},

  mutations: {
    set_token(state,data){
      state.userToken = data
    },
    clear_token(state){
      state.userToken = ""
    }
  },
  actions: {
  },
  modules: {
  }
})
